// Copyright 2023 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package output

import "testing"

func TestBegin(t *testing.T) {
	tests := []QueryParses{
		Converts("BEGIN"),
		Converts("BEGIN WORK"),
		Converts("BEGIN TRANSACTION"),
		Parses("BEGIN ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN WORK ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN WORK ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN WORK ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN WORK ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED"),
		Converts("BEGIN READ WRITE"),
		Converts("BEGIN WORK READ WRITE"),
		Converts("BEGIN TRANSACTION READ WRITE"),
		Converts("BEGIN READ ONLY"),
		Converts("BEGIN WORK READ ONLY"),
		Converts("BEGIN TRANSACTION READ ONLY"),
		Parses("BEGIN DEFERRABLE"),
		Parses("BEGIN WORK DEFERRABLE"),
		Parses("BEGIN TRANSACTION DEFERRABLE"),
		Parses("BEGIN NOT DEFERRABLE"),
		Parses("BEGIN WORK NOT DEFERRABLE"),
		Parses("BEGIN TRANSACTION NOT DEFERRABLE"),
		Unimplemented("BEGIN ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN READ WRITE , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN WORK READ WRITE , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN TRANSACTION READ WRITE , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN READ ONLY , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN WORK READ ONLY , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN TRANSACTION READ ONLY , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN DEFERRABLE , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN WORK DEFERRABLE , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN TRANSACTION DEFERRABLE , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN NOT DEFERRABLE , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN WORK NOT DEFERRABLE , ISOLATION LEVEL SERIALIZABLE"),
		Parses("BEGIN TRANSACTION NOT DEFERRABLE , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("BEGIN ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN READ WRITE , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN WORK READ WRITE , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN TRANSACTION READ WRITE , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN READ ONLY , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN WORK READ ONLY , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN TRANSACTION READ ONLY , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN DEFERRABLE , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN WORK DEFERRABLE , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN TRANSACTION DEFERRABLE , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN NOT DEFERRABLE , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN WORK NOT DEFERRABLE , ISOLATION LEVEL REPEATABLE READ"),
		Parses("BEGIN TRANSACTION NOT DEFERRABLE , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("BEGIN ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN READ WRITE , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN WORK READ WRITE , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN TRANSACTION READ WRITE , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN READ ONLY , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN WORK READ ONLY , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN TRANSACTION READ ONLY , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN DEFERRABLE , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN WORK DEFERRABLE , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN TRANSACTION DEFERRABLE , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN NOT DEFERRABLE , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN WORK NOT DEFERRABLE , ISOLATION LEVEL READ COMMITTED"),
		Parses("BEGIN TRANSACTION NOT DEFERRABLE , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("BEGIN ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN WORK ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN READ WRITE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN WORK READ WRITE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN TRANSACTION READ WRITE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN READ ONLY , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN WORK READ ONLY , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN TRANSACTION READ ONLY , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN DEFERRABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN WORK DEFERRABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN TRANSACTION DEFERRABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN NOT DEFERRABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN WORK NOT DEFERRABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN TRANSACTION NOT DEFERRABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("BEGIN ISOLATION LEVEL SERIALIZABLE , READ WRITE"),
		Parses("BEGIN WORK ISOLATION LEVEL SERIALIZABLE , READ WRITE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE , READ WRITE"),
		Parses("BEGIN ISOLATION LEVEL REPEATABLE READ , READ WRITE"),
		Parses("BEGIN WORK ISOLATION LEVEL REPEATABLE READ , READ WRITE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ , READ WRITE"),
		Parses("BEGIN ISOLATION LEVEL READ COMMITTED , READ WRITE"),
		Parses("BEGIN WORK ISOLATION LEVEL READ COMMITTED , READ WRITE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED , READ WRITE"),
		Parses("BEGIN ISOLATION LEVEL READ UNCOMMITTED , READ WRITE"),
		Parses("BEGIN WORK ISOLATION LEVEL READ UNCOMMITTED , READ WRITE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , READ WRITE"),
		Unimplemented("BEGIN READ WRITE , READ WRITE"),
		Unimplemented("BEGIN WORK READ WRITE , READ WRITE"),
		Unimplemented("BEGIN TRANSACTION READ WRITE , READ WRITE"),
		Unimplemented("BEGIN READ ONLY , READ WRITE"),
		Unimplemented("BEGIN WORK READ ONLY , READ WRITE"),
		Unimplemented("BEGIN TRANSACTION READ ONLY , READ WRITE"),
		Parses("BEGIN DEFERRABLE , READ WRITE"),
		Parses("BEGIN WORK DEFERRABLE , READ WRITE"),
		Parses("BEGIN TRANSACTION DEFERRABLE , READ WRITE"),
		Parses("BEGIN NOT DEFERRABLE , READ WRITE"),
		Parses("BEGIN WORK NOT DEFERRABLE , READ WRITE"),
		Parses("BEGIN TRANSACTION NOT DEFERRABLE , READ WRITE"),
		Parses("BEGIN ISOLATION LEVEL SERIALIZABLE , READ ONLY"),
		Parses("BEGIN WORK ISOLATION LEVEL SERIALIZABLE , READ ONLY"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE , READ ONLY"),
		Parses("BEGIN ISOLATION LEVEL REPEATABLE READ , READ ONLY"),
		Parses("BEGIN WORK ISOLATION LEVEL REPEATABLE READ , READ ONLY"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ , READ ONLY"),
		Parses("BEGIN ISOLATION LEVEL READ COMMITTED , READ ONLY"),
		Parses("BEGIN WORK ISOLATION LEVEL READ COMMITTED , READ ONLY"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED , READ ONLY"),
		Parses("BEGIN ISOLATION LEVEL READ UNCOMMITTED , READ ONLY"),
		Parses("BEGIN WORK ISOLATION LEVEL READ UNCOMMITTED , READ ONLY"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , READ ONLY"),
		Unimplemented("BEGIN READ WRITE , READ ONLY"),
		Unimplemented("BEGIN WORK READ WRITE , READ ONLY"),
		Unimplemented("BEGIN TRANSACTION READ WRITE , READ ONLY"),
		Unimplemented("BEGIN READ ONLY , READ ONLY"),
		Unimplemented("BEGIN WORK READ ONLY , READ ONLY"),
		Unimplemented("BEGIN TRANSACTION READ ONLY , READ ONLY"),
		Parses("BEGIN DEFERRABLE , READ ONLY"),
		Parses("BEGIN WORK DEFERRABLE , READ ONLY"),
		Parses("BEGIN TRANSACTION DEFERRABLE , READ ONLY"),
		Parses("BEGIN NOT DEFERRABLE , READ ONLY"),
		Parses("BEGIN WORK NOT DEFERRABLE , READ ONLY"),
		Parses("BEGIN TRANSACTION NOT DEFERRABLE , READ ONLY"),
		Parses("BEGIN ISOLATION LEVEL SERIALIZABLE , DEFERRABLE"),
		Parses("BEGIN WORK ISOLATION LEVEL SERIALIZABLE , DEFERRABLE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE , DEFERRABLE"),
		Parses("BEGIN ISOLATION LEVEL REPEATABLE READ , DEFERRABLE"),
		Parses("BEGIN WORK ISOLATION LEVEL REPEATABLE READ , DEFERRABLE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ , DEFERRABLE"),
		Parses("BEGIN ISOLATION LEVEL READ COMMITTED , DEFERRABLE"),
		Parses("BEGIN WORK ISOLATION LEVEL READ COMMITTED , DEFERRABLE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED , DEFERRABLE"),
		Parses("BEGIN ISOLATION LEVEL READ UNCOMMITTED , DEFERRABLE"),
		Parses("BEGIN WORK ISOLATION LEVEL READ UNCOMMITTED , DEFERRABLE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , DEFERRABLE"),
		Parses("BEGIN READ WRITE , DEFERRABLE"),
		Parses("BEGIN WORK READ WRITE , DEFERRABLE"),
		Parses("BEGIN TRANSACTION READ WRITE , DEFERRABLE"),
		Parses("BEGIN READ ONLY , DEFERRABLE"),
		Parses("BEGIN WORK READ ONLY , DEFERRABLE"),
		Parses("BEGIN TRANSACTION READ ONLY , DEFERRABLE"),
		Unimplemented("BEGIN DEFERRABLE , DEFERRABLE"),
		Unimplemented("BEGIN WORK DEFERRABLE , DEFERRABLE"),
		Unimplemented("BEGIN TRANSACTION DEFERRABLE , DEFERRABLE"),
		Unimplemented("BEGIN NOT DEFERRABLE , DEFERRABLE"),
		Unimplemented("BEGIN WORK NOT DEFERRABLE , DEFERRABLE"),
		Unimplemented("BEGIN TRANSACTION NOT DEFERRABLE , DEFERRABLE"),
		Parses("BEGIN ISOLATION LEVEL SERIALIZABLE , NOT DEFERRABLE"),
		Parses("BEGIN WORK ISOLATION LEVEL SERIALIZABLE , NOT DEFERRABLE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE , NOT DEFERRABLE"),
		Parses("BEGIN ISOLATION LEVEL REPEATABLE READ , NOT DEFERRABLE"),
		Parses("BEGIN WORK ISOLATION LEVEL REPEATABLE READ , NOT DEFERRABLE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ , NOT DEFERRABLE"),
		Parses("BEGIN ISOLATION LEVEL READ COMMITTED , NOT DEFERRABLE"),
		Parses("BEGIN WORK ISOLATION LEVEL READ COMMITTED , NOT DEFERRABLE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED , NOT DEFERRABLE"),
		Parses("BEGIN ISOLATION LEVEL READ UNCOMMITTED , NOT DEFERRABLE"),
		Parses("BEGIN WORK ISOLATION LEVEL READ UNCOMMITTED , NOT DEFERRABLE"),
		Parses("BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , NOT DEFERRABLE"),
		Parses("BEGIN READ WRITE , NOT DEFERRABLE"),
		Parses("BEGIN WORK READ WRITE , NOT DEFERRABLE"),
		Parses("BEGIN TRANSACTION READ WRITE , NOT DEFERRABLE"),
		Parses("BEGIN READ ONLY , NOT DEFERRABLE"),
		Parses("BEGIN WORK READ ONLY , NOT DEFERRABLE"),
		Parses("BEGIN TRANSACTION READ ONLY , NOT DEFERRABLE"),
		Unimplemented("BEGIN DEFERRABLE , NOT DEFERRABLE"),
		Unimplemented("BEGIN WORK DEFERRABLE , NOT DEFERRABLE"),
		Unimplemented("BEGIN TRANSACTION DEFERRABLE , NOT DEFERRABLE"),
		Unimplemented("BEGIN NOT DEFERRABLE , NOT DEFERRABLE"),
		Unimplemented("BEGIN WORK NOT DEFERRABLE , NOT DEFERRABLE"),
		Unimplemented("BEGIN TRANSACTION NOT DEFERRABLE , NOT DEFERRABLE"),
	}
	RunTests(t, tests)
}
